mono spaced, tab width=8


from control2.c
- = in ndrv

	ATHENS........................	RADICAL	CONTROL.......................................................................................................................		ROW-WORDS
					radacalControl								HPC								GSC-DIVIDE
	D2	N2	ratio	P2Mux		VFPEQ	VFP	VAL	VBP	VBPEQ	VSYNC	VHLINE	PIPED	HPIX	HFP	HAL	HBWAY	HSP	HEQ	HLFLN	HSERR		width	height	hertz
													PipeDelayHWcursor							graphicsClock

-	14	27	1.92857	0x62	0x10	811	810	42	23	4	812	814	48	318	305	49	15	319	8	160	304	2	512	384	60
-	14	27	1.92857	   2	0x10	1045	1042	82	43	4	1048	1050	72	430	393	73	31	431	16	216	400	2	640	480	67
-	23	37	1.6087	   2	0x10	1037	1026	66	34	2	1048	1050	64	398	385	65	47	399	24	200	352	2	640	480	60 VGA
-	23	42	1.82609	   3	0x10	1831	1828	88	46	4	1834	1836	72	414	393	73	39	415	20	208	376	2	640	870	75
-	23	42	1.82609	   3	0x10	1331	1330	82	43	4	1332	1334	136	574	553	137	31	575	16	288	544	2	832	624	75
-	11	28	2.54545	   3	0x10	1603	1600	64	34	4	1606	1608	128	662	641	129	47	663	24	332	616	2	1024	768	75
-	19	61	3.21053	   3	0x10	1825	1822	82	43	4	1828	1830	128	726	705	129	63	727	32	364	664	2	1152	870	75



Info from ndrv (see GrapphicsHALTemplate.c)
																														       |------------------------------ 2MB VRAM -------------------------------|------------------------------ 4MB VRAM -------------------------------|
																														       |         8 bit         |        16 bit         |        32 bit         |         8 bit         |        16 bit         |        32 bit         |
	2MB max depth mode						!_47E					csync disabled															nsCLUTAddrRegDelay
		4MB max depth mode					ENABLE_12				ENABLE_2																GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE
			width	height	hertz	N2	D2	P2Mux		TEST_3	TEST_4	TEST_5	TEST_9		HSERR	HLFLN	HEQ	HSP	HBWAY	HAL	HFP	HPIX	VHLINE	VSYNC	VBPEQ	VBP	VAL	VFP	VFPEQ			PIPED	byte1		PIPED	byte1		PIPED	byte1		PIPED	byte1		PIPED	byte1		PIPED	byte1
										0	1	2	3	4	5	6	7	8	9	10	11	12	13	14	15	16	17	18	19																				filler	filler	filler

	130	130	512	384	60 NTSC	47	30	   1	0	1	0	0	0	0	181	195	15	389	28	86	342	388	525	523	4	43	82	466	495	512	2	77	0x10	1	83	0x14	0	85	0x18	3	73	0x20	2	81	0x24	1	85	0x28	0	0	0
	130	130	512	384	60	27	14	0x62	1	0	0	0	0	0	304	160	8	319	15	49	305	318	814	812	4	23	42	810	811	512	2	40	0x10	1	46	0x14	0	48	0x18	3	36	0x20	2	44	0x24	1	48	0x28	0	0	0
	130	130	640	480	50 PAL	66	35	   1	0	1	0	0	0	0	219	236	18	471	34	102	422	470	625	623	3	45	86	566	595	512	2	93	0x10	1	99	0x14	0	101	0x18	3	89	0x20	2	97	0x24	1	101	0x28	0	0	0
	130	130	640	480	60 NTSC	47	30	   1	0	1	0	0	0	0	181	195	15	389	28	54	374	388	525	524	4	9	34	514	519	512	2	45	0x10	1	51	0x14	0	53	0x18	3	41	0x20	2	49	0x24	1	53	0x28	0	0	0
	130	130	640	480	60 VGA	37	23	   2	1	0	0	0	0	0	352	200	24	399	47	65	385	398	1050	1048	2	34	66	1026	1037	256	2	56	0x10	1	62	0x14	0	64	0x18	3	52	0x20	2	60	0x24	1	64	0x28	0	0	0
	130	130	640	480	67	27	14	   2	1	0	0	0	0	0	400	216	16	431	31	73	393	430	1050	1048	4	43	82	1042	1045	128	2	64	0x10	1	70	0x14	0	72	0x18	3	60	0x20	2	68	0x24	1	72	0x28	0	0	0
	130	130	640	480	120	127	76	   3	1	0	0	0	1	1	392	212	16	423	31	77	397	422	1030	1028	4	35	66	1026	1027	128	2	68	0x10	1	74	0x14	0	76	0x18	3	64	0x20	2	72	0x24	1	76	0x28	0	0	0
	129	130	640	870	75	42	23	   3	1	0	0	0	0	0	376	208	20	415	39	73	393	414	1836	1834	4	46	88	1828	1831	128	2	64	0x10	1	70	0x14	0	0	0	3	60	0x20	2	68	0x24	1	72	0x28	0	0	0
	130	130	768	576	50 PAL	66	35	   1	0	1	0	0	0	0	219	236	18	471	34	70	454	470	625	623	3	21	38	614	619	512	2	61	0x10	1	67	0x14	0	69	0x18	3	57	0x20	2	65	0x24	1	69	0x28	0	0	0
	130	130	800	600	60 VGA	28	11	   2	1	0	0	1	1	1	464	264	32	527	63	101	501	526	1256	1254	6	29	52	1252	1253	128	2	92	0x10	1	98	0x14	0	100	0x18	3	88	0x20	2	96	0x24	1	100	0x28	0	0	0
	130	130	800	600	72 VGA	27	14	0x53	1	0	0	1	1	1	460	260	30	519	59	85	485	518	1332	1330	10	33	56	1256	1293	128	2	76	0x10	1	82	0x14	0	84	0x18	3	72	0x20	2	80	0x24	1	84	0x28	0	0	0
	130	130	800	600	75 VGA	22	7	   2	1	0	0	1	1	1	488	264	20	527	39	113	513	526	1250	1248	4	25	46	1246	1247	128	2	104	0x10	1	110	0x14	0	112	0x18	3	100	0x20	2	108	0x24	1	112	0x28	0	0	0
	130	130	832	624	75	42	23	   3	1	0	0	0	0	0	544	288	16	575	31	137	553	574	1334	1332	4	43	82	1330	1331	128	2	128	0x10	1	134	0x14	0	136	0x18	3	124	0x20	2	132	0x24	1	136	0x28	0	0	0
	129	130	1024	768	60 VGA	31	15	   3	1	0	0	0	0	1	604	336	34	671	67	141	653	670	1612	1610	10	39	68	1604	1607	128	2	132	0x10	1	138	0x14	0	0	0	3	128	0x20	2	136	0x24	1	140	0x28	0	0	0
	129	130	1024	768	75 VGA	78	31	   3	1	0	0	1	1	1	608	328	24	655	47	129	641	654	1600	1598	4	32	60	1596	1597	128	2	120	0x10	1	126	0x14	0	0	0	3	116	0x20	2	124	0x24	1	128	0x28	0	0	0
	129	130	1024	768	75	28	11	   3	1	0	0	0	0	0	616	332	24	663	47	129	641	662	1608	1606	4	34	64	1600	1603	128	2	120	0x10	1	126	0x14	0	0	0	3	116	0x20	2	124	0x24	1	128	0x28	0	0	0
	129	130	1152	870	75	61	19	   3	1	0	0	0	0	0	664	364	32	727	63	129	705	726	1830	1828	4	43	82	1822	1825	128	2	120	0x10	1	126	0x14	0	0	0	3	116	0x20	2	124	0x24	1	128	0x28	0	0	0

	128	129	1280	960	75	125	31	   3	1	0	0	1	1	0	384	210	18	419	35	89	409	418	2000	1998	4	40	76	1996	1997	128	1	86	0x50	0	0	0	0	0	0	2	84	0x60	1	88	0x64	0	0	0	0	0	0
	128	129	1280	1024	75	56	13	   3	1	0	0	1	1	0	386	211	18	421	35	91	411	420	2132	2130	4	42	80	2128	2129	128	1	88	0x50	0	0	0	0	0	0	2	86	0x60	1	90	0x64	0	0	0	0	0	0



Info from ndrv (see GrapphicsHALTemplate.c) converted to control2.c format
 = different than control2.c value
- = in control2.c
(###) = new value for control2.c																														       |------------------------------ 2MB VRAM -------------------------------|------------------------------ 4MB VRAM -------------------------------|
																												ENABLE_12					       |         8 bit         |        16 bit         |        32 bit         |         8 bit         |        16 bit         |        32 bit         |
																										2MB max depth mode						nsCLUTAddrRegDelay
					radacalControl							4MB VRAM 								2MB VRAM				4MB max depth mode				ENABLE_2	GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE		GSC-DIVIDE
	D2	N2	ratio	P2Mux		VFPEQ	VFP	VAL	VBP	VBPEQ	VSYNC	VHLINE	PIPED	HPIX	HFP	HAL	HBWAY	HSP	HEQ	HLFLN	HSERR	8 bit	width	height	hertz			!_47E	TEST_3	TEST_4	TEST_5	TEST_9	csync disabled		PIPED	byte1		PIPED	byte1		PIPED	byte1		PIPED	byte1		PIPED	byte1		PIPED	byte1
						19	18	17	16	15	14	13	32 bit	12	11	10	9	8	7	6	5	GSC-DIVIDE						0	1	2	3	4																				filler	filler	filler

	30	47	1.56667	   1	16	495	466	82	43	4	523	525	85	388	342	86	28	389	15	195	181	2	512	384	60 NTSC	130	130	0	1	0	0	0	0	512	2	77	16	1	83	20	0	85	24	3	73	32	2	81	36	1	85	40	0	0	0
-	14	27	1.92857	0x62	16	811	810	42	23	4	812	814	48	318	305	49	15	319	8	160	304	2	512	384	60	130	130	1	0	0	0	0	0	512	2	40	16	1	46	20	0	48	24	3	36	32	2	44	36	1	48	40	0	0	0
	35	66	1.88571	   1	16	595	566	86	45	3	623	625	101	470	422	102	34	471	18	236	219	2	640	480	50 PAL	130	130	0	1	0	0	0	0	512	2	93	16	1	99	20	0	101	24	3	89	32	2	97	36	1	101	40	0	0	0
	30	47	1.56667	   1	16	519	514	34	9	4	524	525	53	388	374	54	28	389	15	195	181	2	640	480	60 NTSC	130	130	0	1	0	0	0	0	512	2	45	16	1	51	20	0	53	24	3	41	32	2	49	36	1	53	40	0	0	0
-	23	37	1.6087	   2	16	1037	1026	66	34	2	1048	1050	64	398	385	65	47	399	24	200	352	2	640	480	60 VGA	130	130	1	0	0	0	0	0	256	2	56	16	1	62	20	0	64	24	3	52	32	2	60	36	1	64	40	0	0	0
-	14	27	1.92857	   2	16	1045	1042	82	43	4	1048	1050	72	430	393	73	31	431	16	216	400	2	640	480	67	130	130	1	0	0	0	0	0	128	2	64	16	1	70	20	0	72	24	3	60	32	2	68	36	1	72	40	0	0	0
	76	127	1.67105	   3	16	1027	1026	66	35	4	1028	1030	76	422	397	77	31	423	16	212	392	2	640	480	120	130	130	1	0	0	0	1	1	128	2	68	16	1	74	20	0	76	24	3	64	32	2	72	36	1	76	40	0	0	0
-	23	42	1.82609	   3	16	1831	1828	88	46	4	1834	1836	72	414	393	73	39	415	20	208	376	2	640	870	75	129	130	1	0	0	0	0	0	128	2	64	16	1	70	20	0	0	0	3	60	32	2	68	36	1	72	40	0	0	0
	35	66	1.88571	   1	16	619	614	38	21	3	623	625	69	470	454	70	34	471	18	236	219	2	768	576	50 PAL	130	130	0	1	0	0	0	0	512	2	61	16	1	67	20	0	69	24	3	57	32	2	65	36	1	69	40	0	0	0
	11	28	2.54545	   2	16	1253	1252	52	29	6	1254	1256	100	526	501	101	63	527	32	264	464	2	800	600	60 VGA	130	130	1	0	0	1	1	1	128	2	92	16	1	98	20	0	100	24	3	88	32	2	96	36	1	100	40	0	0	0
	14	27	1.92857	0x53	16	1293	1256	56	33	10	1330	1332	84	518	485	85	59	519	30	260	460	2	800	600	72 VGA	130	130	1	0	0	1	1	1	128	2	76	16	1	82	20	0	84	24	3	72	32	2	80	36	1	84	40	0	0	0
	7	22	3.14286	   2	16	1247	1246	46	25	4	1248	1250	112	526	513	113	39	527	20	264	488	2	800	600	75 VGA	130	130	1	0	0	1	1	1	128	2	104	16	1	110	20	0	112	24	3	100	32	2	108	36	1	112	40	0	0	0
-	23	42	1.82609	   3	16	1331	1330	82	43	4	1332	1334	136	574	553	137	31	575	16	288	544	2	832	624	75	130	130	1	0	0	0	0	0	128	2	128	16	1	134	20	0	136	24	3	124	32	2	132	36	1	136	40	0	0	0
	15	31	2.06667	   3	16	1607	1604	68	39	10	1610	1612	140	670	653	141	67	671	34	336	604	2	1024	768	60 VGA	129	130	1	0	0	0	0	1	128	2	132	16	1	138	20	0	0	0	3	128	32	2	136	36	1	140	40	0	0	0
	31	78	2.51613	   3	16	1597	1596	60	32	4	1598	1600	128	654	641	129	47	655	24	328	608	2	1024	768	75 VGA	129	130	1	0	0	1	1	1	128	2	120	16	1	126	20	0	0	0	3	116	32	2	124	36	1	128	40	0	0	0
-	11	28	2.54545	   3	16	1603	1600	64	34	4	1606	1608	128	662	641	129	47	663	24	332	616	2	1024	768	75	129	130	1	0	0	0	0	0	128	2	120	16	1	126	20	0	0	0	3	116	32	2	124	36	1	128	40	0	0	0
-	19	61	3.21053	   3	16	1825	1822	82	43	4	1828	1830	128	726	705	129	63	727	32	364	664	2	1152	870	75	129	130	1	0	0	0	0	0	128	2	120	16	1	126	20	0	0	0	3	116	32	2	124	36	1	128	40	0	0	0

	31	125	4.03226	   3	16	1997	1996	76	40	4	1998	2000	0 (88)	418	409	89	35	419	18	210	384	1	1280	960	75	128	129	1	0	0	1	1	0	128	1	86	80	0	0	0	0	0	0	2	84	96	1	88	100	0	0	0	0	0	0
	13	56	4.30769	   3	16	2129	2128	80	42	4	2130	2132	0 (90)	420	411	91	35	421	18	211	386	1	1280	1024	75	128	129	1	0	0	1	1	0	128	1	88	80	0	0	0	0	0	0	2	86	96	1	90	100	0	0	0	0	0	0

Observations:
- PIPED values = HAL value - 3^(MaxDepthMode - depthMode)) - 4mbvram*2*(MaxDepthMode - depthMode)
- PIPED values are odd for NTSC and PAL modes



Info from OpenControlFramebuffer.cpp

	hex	mode	width	height	refresh	appleTimingID			clock0	clock1	clock2	reg0	reg1	reg2	reg3	reg4	reg5	reg6	reg7	reg8	reg9	reg10	reg11	reg12	reg13	reg14	reg15	reg16	reg17	reg18

	01	1	512	384	59.9394	timingAppleNTSC_ST      	0	0	   0	0
	02	2	512	384	60     	timingApple_512x384_60hz	0	0	   0	0
	03	3	640	480	50     	timingApplePAL_ST       	0	0	   0	0
	04	4	640	480	59.9394	timingAppleNTSC_FF      	0	0	   0	0
	05	5	640	480	59.9394	timingVESA_640x480_60hz 	18	29	   2	0	1038	1028	68	35	2	1048	1050	63	398	383	63	47	399	24	200	352	0	59
	06	6	640	480	66.6660	timingApple_640x480_67hz	25	48	   2	0	1045	1042	82	43	4	1048	1050	70	430	391	71	31	431	16	216	400	0	59
	07	7	640	870	75     	timingApple_640x870_75hz	0	0	   0	0
	08	8	768	576	50     	timingApplePAL_FF       	0	0	   0	0
	09	9	800	600	56     	timingVESA_800x600_56hz 	10	23	   2	0	1247	1246	46	24	2	1248	1250	84	510	491	91	35	511	18	256	476	0	59
	0A	10	800	600	60     	timingVESA_800x600_60hz 	25	64	   2	0	1253	1252	52	29	6	1254	1256	92	526	499	99	63	527	32	264	464	0	59
	0B	11	800	600	72     	timingVESA_800x600_72hz 	5	16	   2	0	1293	1256	56	33	10	1330	1332	82	518	483	83	59	519	30	260	460	0	59
	0C	12	800	600	75     	timingVESA_800x600_75hz 	6	19	   2	0	1247	1246	46	25	4	1248	1250	104	526	511	111	39	527	20	264	488	0	59
	0D	13	832	624	75     	timingApple_832x624_75hz	19	70	   2	0	1331	1330	82	43	4	1332	1334	136	574	551	135	31	575	16	288	544	0	59
	0E	14	1024	768	60     	timingVESA_1024x768_60hz	25	52	   3	0	1607	1604	68	39	10	1610	1612	132	670	651	139	67	671	34	336	604	0	59
	0F	15	1024	768	72     	timingVESA_1024x768_70hz	5	12	   3	0	1607	1604	68	39	10	1610	1612	124	662	643	131	67	663	34	332	596	0	59
	10	16	1024	768	75     	timingVESA_1024x768_75hz	25	63	   3	0	1597	1596	60	32	4	1598	1600	128	654	647	135	47	655	24	328	608	0	59
	11	17	1024	768	75     	timingApple_1024x768_75hz	25	63	   3	0	1597	1596	60	32	4	1598	1600	120	654	639	127	47	655	24	328	608	0	59
	12	18	1152	870	75     	timingApple_1152x870_75hz	5	16	   3	0	1825	1822	82	43	4	1828	1830	126	726	703	127	63	727	32	364	664	0	59

	13	19	1280	960	75     	timingVESA_1280x960_75hz	1	4	   3	0	1997	1996	76	40	4	1998	2000	176	838	823	183	71	839	36	420	768	0	59
	14	20	1280	1024	75     	timingVESA_1280x1024_75hz	22	95	   3	0	2129	2128	80	42	4	2130	2132	164	842	811	171	55	843	28	422	788	0	59


Info from OpenControlFramebuffer.cpp converted to control2.c format
												32 bit
	D2	N2		P2Mux	VFPEQ	VFP	VAL	VBP	VBPEQ	VSYNC	VHLINE	PIPED	HPIX	HFP	HAL	HBWAY	HSP	HEQ	HLFLN	HSERR	CNTTST	TEST
	clock0	clock1	ratio	clock2	reg1	reg2	reg3	reg4	reg5	reg6	reg7	reg8	reg9	reg10	reg11	reg12	reg13	reg14	reg15	reg16	reg17	reg18	width	height	refresh	hex	mode	appleTimingID
												calculated
	0	0		   0																			512	384	59.9394	01	1	timingAppleNTSC_ST
	0	0		   0																			512	384	60     	02	2	timingApple_512x384_60hz
	0	0		   0																			640	480	50     	03	3	timingApplePAL_ST
	0	0		   0																			640	480	59.9394	04	4	timingAppleNTSC_FF
	18	29	1.61111	   2	1038	1028	68	35	2	1048	1050	63	398	383	63	47	399	24	200	352	0	59	640	480	59.9394	05	5	timingVESA_640x480_60hz
	25	48	1.92	   2	1045	1042	82	43	4	1048	1050	70	430	391	71	31	431	16	216	400	0	59	640	480	66.6660	06	6	timingApple_640x480_67hz
	0	0		   0																			640	870	75     	07	7	timingApple_640x870_75hz
	0	0		   0																			768	576	50     	08	8	timingApplePAL_FF
	10	23	2.3	   2	1247	1246	46	24	2	1248	1250	84	510	491	91	35	511	18	256	476	0	59	800	600	56     	09	9	timingVESA_800x600_56hz
	25	64	2.56	   2	1253	1252	52	29	6	1254	1256	92	526	499	99	63	527	32	264	464	0	59	800	600	60     	0A	10	timingVESA_800x600_60hz
	5	16	3.2	   2	1293	1256	56	33	10	1330	1332	82	518	483	83	59	519	30	260	460	0	59	800	600	72     	0B	11	timingVESA_800x600_72hz
	6	19	3.16667	   2	1247	1246	46	25	4	1248	1250	104	526	511	111	39	527	20	264	488	0	59	800	600	75     	0C	12	timingVESA_800x600_75hz
	19	70	3.68421	   2	1331	1330	82	43	4	1332	1334	136	574	551	135	31	575	16	288	544	0	59	832	624	75     	0D	13	timingApple_832x624_75hz
	25	52	2.08	   3	1607	1604	68	39	10	1610	1612	132	670	651	139	67	671	34	336	604	0	59	1024	768	60     	0E	14	timingVESA_1024x768_60hz
	5	12	2.4	   3	1607	1604	68	39	10	1610	1612	124	662	643	131	67	663	34	332	596	0	59	1024	768	72     	0F	15	timingVESA_1024x768_70hz
	25	63	2.52	   3	1597	1596	60	32	4	1598	1600	128	654	647	135	47	655	24	328	608	0	59	1024	768	75     	10	16	timingVESA_1024x768_75hz
	25	63	2.52	   3	1597	1596	60	32	4	1598	1600	120	654	639	127	47	655	24	328	608	0	59	1024	768	75     	11	17	timingApple_1024x768_75hz
	5	16	3.2	   3	1825	1822	82	43	4	1828	1830	126	726	703	127	63	727	32	364	664	0	59	1152	870	75     	12	18	timingApple_1152x870_75hz

	1	4	4	   3	1997	1996	76	40	4	1998	2000	176	838	823	183	71	839	36	420	768	0	59	1280	960	75     	13	19	timingVESA_1280x960_75hz
	22	95	4.31818	   3	2129	2128	80	42	4	2130	2132	164	842	811	171	55	843	28	422	788	0	59	1280	1024	75     	14	20	timingVESA_1280x1024_75hz




create k512x384@60NTSC
h# 1e2f0110 L,
d# 495 w, d# 466 w, d# 82 w, d# 43 w, d# 4 w, d# 523 w, d# 525 w, d# 85 w,
d# 388 w, d# 342 w, d# 86 w, d# 28 w, d# 389 w, d# 15 w, d# 195 w, d# 181 w,
d# 2 w, d# 512 w, d# 384 w,
create k640x480@50PAL
h# 23420110 L,
d# 595 w, d# 566 w, d# 86 w, d# 45 w, d# 3 w, d# 623 w, d# 625 w, d# 101 w,
d# 470 w, d# 422 w, d# 102 w, d# 34 w, d# 471 w, d# 18 w, d# 236 w, d# 219 w,
d# 2 w, d# 640 w, d# 480 w,
create k640x480@60NTSC
h# 1e2f0110 L,
d# 519 w, d# 514 w, d# 34 w, d# 9 w, d# 4 w, d# 524 w, d# 525 w, d# 53 w,
d# 388 w, d# 374 w, d# 54 w, d# 28 w, d# 389 w, d# 15 w, d# 195 w, d# 181 w,
d# 2 w, d# 640 w, d# 480 w,
create k640x480@120
h# 4c7f0310 L,
d# 1027 w, d# 1026 w, d# 66 w, d# 35 w, d# 4 w, d# 1028 w, d# 1030 w, d# 76 w,
d# 422 w, d# 397 w, d# 77 w, d# 31 w, d# 423 w, d# 16 w, d# 212 w, d# 392 w,
d# 2 w, d# 640 w, d# 480 w,
create k768x576@50PAL
h# 23420110 L,
d# 619 w, d# 614 w, d# 38 w, d# 21 w, d# 3 w, d# 623 w, d# 625 w, d# 69 w,
d# 470 w, d# 454 w, d# 70 w, d# 34 w, d# 471 w, d# 18 w, d# 236 w, d# 219 w,
d# 2 w, d# 768 w, d# 576 w,
create k800x600@60VGA
h# 0b1c0210 L,
d# 1253 w, d# 1252 w, d# 52 w, d# 29 w, d# 6 w, d# 1254 w, d# 1256 w, d# 100 w,
d# 526 w, d# 501 w, d# 101 w, d# 63 w, d# 527 w, d# 32 w, d# 264 w, d# 464 w,
d# 2 w, d# 800 w, d# 600 w,
create k800x600@72VGA
h# 0e1b5310 L,
d# 1293 w, d# 1256 w, d# 56 w, d# 33 w, d# 10 w, d# 1330 w, d# 1332 w, d# 84 w,
d# 518 w, d# 485 w, d# 85 w, d# 59 w, d# 519 w, d# 30 w, d# 260 w, d# 460 w,
d# 2 w, d# 800 w, d# 600 w,
create k800x600@75VGA
h# 07160210 L,
d# 1247 w, d# 1246 w, d# 46 w, d# 25 w, d# 4 w, d# 1248 w, d# 1250 w, d# 112 w,
d# 526 w, d# 513 w, d# 113 w, d# 39 w, d# 527 w, d# 20 w, d# 264 w, d# 488 w,
d# 2 w, d# 800 w, d# 600 w,
create k1024x768@60VGA
h# 0f1f0310 L,
d# 1607 w, d# 1604 w, d# 68 w, d# 39 w, d# 10 w, d# 1610 w, d# 1612 w, d# 140 w,
d# 670 w, d# 653 w, d# 141 w, d# 67 w, d# 671 w, d# 34 w, d# 336 w, d# 604 w,
d# 2 w, d# 1024 w, d# 768 w,
create k1024x768@75VGA
h# 1f4e0310 L,
d# 1597 w, d# 1596 w, d# 60 w, d# 32 w, d# 4 w, d# 1598 w, d# 1600 w, d# 128 w,
d# 654 w, d# 641 w, d# 129 w, d# 47 w, d# 655 w, d# 24 w, d# 328 w, d# 608 w,
d# 2 w, d# 1024 w, d# 768 w,
create k1280x960@75
h# 1f7d0310 L,
d# 1997 w, d# 1996 w, d# 76 w, d# 40 w, d# 4 w, d# 1998 w, d# 2000 w, d# 88 w,
d# 418 w, d# 409 w, d# 89 w, d# 35 w, d# 419 w, d# 18 w, d# 210 w, d# 384 w,
d# 1 w, d# 1280 w, d# 960 w,
create k1280x1024@75
h# 0d380310 L,
d# 2129 w, d# 2128 w, d# 80 w, d# 42 w, d# 4 w, d# 2130 w, d# 2132 w, d# 90 w,
d# 420 w, d# 411 w, d# 91 w, d# 35 w, d# 421 w, d# 18 w, d# 211 w, d# 386 w,
d# 1 w, d# 1280 w, d# 1024 w,












testing:

( 00 00 )	0 l,
( 01 01 )	k512x384@60NTSC l,	// x 35 kHz 67 kHz
( 02 02 )	k512x384@60 l,		// x 24.5 kHz 60 Hz - not viewable on SONY
( 03 03 )	k640x480@50PAL l,	// x
( 04 04 )	k640x480@60NTSC l,	// x
( 05 05 )	k640x480@60VGA l,	//  640x480 31.5 kHz 60 Hz
( 06 06 )	k640x480@67 l,		//  35 khz 67 Hz
( 07 07 )	k640x870@75 l,		//  ?*870 68.75 kHz 75 Hz
( 08 08 )	k768x576@50PAL l,	// x
( 09 09 )	0 l, \ k800x600@56VGA
( 0A 10 )	k800x600@60VGA l,	//  37.75 kHz 60 Hz
( 0B 11 )	k800x600@72VGA l,	//  47.9-48 kHz 72 Hz
( 0C 12 )	k800x600@75VGA l,	//  46.6-46.75 kHz 75 Hz
( 0D 13 )	k832x624@75 l,		//  832x624 49.75 kHz 74-75 Hz
( 0E 14 )	k1024x768@60VGA l,	// ? 1024*768 48.25 kHz 60 Hz - horizontal sync is 2/3 of width from the left
( 0F 15 )	0 l, \ k1024x768@72VGA
( 10 16 )	k1024x768@75VGA l,	// ? 1024x768 60 kHz 75 Hz - horizontal sync is 2/3 of width from the left
( 11 17 )	k1024x768@75 l,		//  1024x768 60 kHz 75 Hz
( 12 18 )	k1152x870@75 l,		//  1152x870 68.75 75-76 Hz
( 13 19 )	k1280x960@75 l,		// x 150.4 kHz 150 Hz
( 14 20 )	k1280x1024@75 l,	// x 160 kHz 150 Hz

\ for testing different modes, enter these commands then use e.g. "11 hh" to set mode to k1152x870@75
dev /chaos/control/
: set-mode
0 swap 10 << A + encode-2ints
" gprf" property " /chaos/control" select-dev " linebytes" active-package get-package-property 2drop l@ to rowbytes ;
: test-pattern { ; color }
0 -> color height 20 - 0 do width 20 - 0 do color ff and i j 20 20 fill-rectangle color 1 + -> color 20 +loop 20 +loop ;
: my-get-mode false k640x480@60vga check-pref ;
' get-mode ' my-get-mode R
: hh set-mode test-pattern ;


\ check for proper PIPED (PipeDelayHWcursor) value
400 0 do i . i k1024x768@60VGA 12 + w! e hh key 20 = ?leave 10 +loop
90 89 do i . i k1024x768@60VGA 12 + w! e hh key 20 = ?leave 1 +loop


d# 90 k1280x960@75 12 + w! 14 hh



Set theFile 'Work:Programming:CW Projects:control:control Open Firmware:from boot-68:control values'
Loop
	Find /[0-9]+/ "{theFile}" || Break
	Set theNum `Catenate "{theFile}".`
	Replace  "`Evaluate {theNum}256`	`Evaluate {theNum}%256`" "{theFile}"
	Find /t[0-9]+/ "{theFile}" || Break
End


Set theFile 'Work:Programming:CW Projects:control:control Open Firmware:from boot-68:control values'
Loop
	Find /[0-9]+t[0-9]+/ "{theFile}" || Break
	If "`Catenate "{theFile}".`" =~ /([1-9][0-9]*)1t([1-9][0-9]*)2/
		Replace  "t"`(Evaluate ({2}*10000000{1}+50)100) | StreamEdit -e "1 Change '000000000000' .; /[0]+([1-9]*[0-9]*[0-9])1(?5)2/ Change 1 '.' 2; Replace /[.]*[0]+/ ''"`"t" "{theFile}"
	Else
		Replace  "tt" "{theFile}"
	End
End

#for 1 in 1 2 3 10 100
#for 2 in 1 2 3 10 100
for 1 In 23
for 2 In 38
	Echo -n "{2}  {1} = "
	(Evaluate {2}*10000000{1}) | StreamEdit -e "1 Change '000000000000' .; /[0]+([1-9]*[0-9]*[0-9])1(?7)2/ Change 1 '.' 2; Replace /[.]*[0]+/ ''"
end
end
